/*
 * $Id: AbstractHstStepLogs.java,v 1.7 2009/12/17 23:18:15 navdeep_mahajan Exp $
 *
 * Copyright (C) 2006 General Electric Company. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 *
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */

package com.ge.healthcare.autosc.common.database.pojo;

import com.ge.healthcare.autosc.common.ASCUtil;


/**
 * AbstractHstStepLogs entity provides the base persistence definition of the
 * HstStepLogs entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractHstStepLogs implements java.io.Serializable {

	/**
	 * Eclipse generated
	 */
	private static final long serialVersionUID = 7889950761546670969L;
	// Fields
	private static final int STEP_LOG_MAX_LENGTH = 4000;
	private Long stepLogId;
	private HstStepTime hstStepTime;
	private String stepLogText;

	// Constructors

	/** default constructor */
	public AbstractHstStepLogs() {
	}

	/** full constructor */
	public AbstractHstStepLogs(HstStepTime hstStepTime, String stepLogText) {
		this.hstStepTime = hstStepTime;
		this.setStepLogText(stepLogText);
	}

	// Property accessors

	public Long getStepLogId() {
		return this.stepLogId;
	}

	public void setStepLogId(Long stepLogId) {
		this.stepLogId = stepLogId;
	}

	public HstStepTime getHstStepTime() {
		return this.hstStepTime;
	}

	public void setHstStepTime(HstStepTime hstStepTime) {
		this.hstStepTime = hstStepTime;
	}

	public String getStepLogText() {
		return this.stepLogText;
	}

	public void setStepLogText(String stepLogText) {
		if (! ASCUtil.isNullOrEmpty(stepLogText) && stepLogText.length() > STEP_LOG_MAX_LENGTH){
			stepLogText = stepLogText.substring(0, (STEP_LOG_MAX_LENGTH));
		}
		this.stepLogText = stepLogText;
	}

	public int getMaxLogLength(){
		return STEP_LOG_MAX_LENGTH;
	}
}
